home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14100 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  892 b 

  1. Path: nntp.crl.com!usenet
  2. From: bk077@freenet.hsc.colorado.edu (ted)
  3. Newsgroups: comp.lang.c++
  4. Subject: solve equation non-recursively
  5. Date: Fri, 29 Mar 1996 02:43:01 GMT
  6. Organization: CRL Dialup Internet Access
  7. Message-ID: <4jfjfv$q7b@nntp.crl.com>
  8. Reply-To: ta@crl.com
  9. NNTP-Posting-Host: crl5.crl.com
  10. X-Newsreader: Forte Free Agent v0.46
  11.  
  12. i am trying to write a program to solve a 1st order equation but it
  13. cannot be done recursively because it can use up to 10,000 variables,
  14. which would wipe out my memory.  
  15.  
  16. the equation would look like;  A*x1 + B*x2 + C*x3 ... Z*xn  = Z
  17.  where n <10,000
  18.  
  19. i am given x1, x2, x3... xn, and Z
  20. also, everything is of type int.
  21.  
  22. example;
  23.  x1, x2, x3 =  {23, 44, 55}
  24.               Z = 1000
  25.  
  26. would look like:  23A+44B+55C = 1000,
  27. i need to solve for A, B, and C.
  28.  
  29. i need only the 1st (arrived at ) solution.
  30.  
  31. any suggestions?
  32.  
  33. tnx, ted atwood.
  34.  
  35. ta@crl.com
  36.  
  37.  
  38.